namespace WpfApplication1.Migrations
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;
    using WpfApplication1.ContactModule;
    using WpfApplication1.TaskModule;

    internal sealed class Configuration : DbMigrationsConfiguration<WpfApplication1.ItemsDbContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = true;
        }

        protected override void Seed(WpfApplication1.ItemsDbContext context)
        {
            context.TaskItems.AddOrUpdate(
                t => t.Id,
                new TaskItem { Id = 1, Name = "Andrew Peters", Notes = "hello there !" },
                new TaskItem { Id = 2, Name = "Costas Bakopanos", Notes = "hello from Kotsos !" },
                new TaskItem { Id = 3, Name = "Mitsaras", Notes = "hello there from Mitsos !" },
                new TaskItem { Id = 4, Name = "Melidis", Notes = "I am learning how to program" }
                );

            context.ContactItems.AddOrUpdate(
               c => c.ContactId,
               new ContactItem { ContactId = 102, ContactEmail = "dmetozis@gmail.com", ContactFirstName = "Dimitris", ContactLastName = "Metozis" }
               );
        }
    }
}
